home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 February / macformat-047.iso / Demos / Simpsons Cartoon Studio™ Demo / Simpdata / simpmain / 00031_main frame script.ls < prev    next >
Encoding:
Text File  |  1996-09-06  |  3.9 KB  |  107 lines

  1. global paletteVisibleP, editPaletteP, volumePaletteP, playBtnSprite, loopBtnSprite
  2.  
  3. on exitFrame
  4.   if paletteVisibleP and not editPaletteP and not volumePaletteP then
  5.     animate(paletteMgr)
  6.   end if
  7.   go(the frame)
  8. end
  9.  
  10. on mouseDown
  11.   hideFieldHiliterSpr(appMgr)
  12.   if paletteVisibleP then
  13.     hidePalette(paletteMgr)
  14.   end if
  15. end
  16.  
  17. on keyDown
  18.   if the lastKey < 5 then
  19.     hideFieldHiliterSpr(appMgr)
  20.     if the key = "o" then
  21.       if paletteVisibleP then
  22.         hidePalette(paletteMgr)
  23.       end if
  24.       forceBtnClick(interfaceMgr, "func snd", "open hilite", point(207, 18), "openCartoon(fileMgr)")
  25.     else
  26.       if the key = "n" then
  27.         if paletteVisibleP then
  28.           hidePalette(paletteMgr)
  29.         end if
  30.         forceBtnClick(interfaceMgr, "func snd", "new hilite", point(108, 18), "newCartoon(appMgr)")
  31.       else
  32.         if the key = "s" then
  33.           if paletteVisibleP then
  34.             hidePalette(paletteMgr)
  35.           end if
  36.           forceBtnClick(interfaceMgr, "func snd", "save hilite", point(309, 18), "saveCartoon(fileMgr)")
  37.         else
  38.           if the key = "p" then
  39.             if paletteVisibleP then
  40.               hidePalette(paletteMgr)
  41.             end if
  42.             forcePlayBtnClick(interfaceMgr)
  43.           else
  44.             if the key = "l" then
  45.               if paletteVisibleP then
  46.                 hidePalette(paletteMgr)
  47.               end if
  48.               loopBtnClick(interfaceMgr)
  49.             else
  50.               if the key = "r" then
  51.                 if paletteVisibleP then
  52.                   hidePalette(paletteMgr)
  53.                 end if
  54.                 forceBtnClick(interfaceMgr, "rw snd", "rewind hilite", point(172, 468), "rewind(playbackMgr)")
  55.               else
  56.                 if the keyCode = 88 then
  57.                   if paletteVisibleP then
  58.                     hidePalette(paletteMgr)
  59.                   end if
  60.                   forceBtnClick(interfaceMgr, "sf snd", "stepforward hilite", point(520, 452), "stepForward(playbackMgr)")
  61.                 else
  62.                   if the keyCode = 124 then
  63.                     if paletteVisibleP then
  64.                       hidePalette(paletteMgr)
  65.                     end if
  66.                     forceBtnClick(interfaceMgr, "sf snd", "stepforward hilite", point(520, 452), "stepForward(playbackMgr)")
  67.                   else
  68.                     if the keyCode = 86 then
  69.                       if paletteVisibleP then
  70.                         hidePalette(paletteMgr)
  71.                       end if
  72.                       forceBtnClick(interfaceMgr, "sb snd", "stepback hilite", point(485, 452), "stepBack(playbackMgr)")
  73.                     else
  74.                       if the keyCode = 123 then
  75.                         if paletteVisibleP then
  76.                           hidePalette(paletteMgr)
  77.                         end if
  78.                         forceBtnClick(interfaceMgr, "sb snd", "stepback hilite", point(485, 452), "stepBack(playbackMgr)")
  79.                       else
  80.                         if the key = "q" then
  81.                           if paletteVisibleP then
  82.                             hidePalette(paletteMgr)
  83.                           end if
  84.                           forceBtnClick(interfaceMgr, "quit snd", "quit hilite", point(518, 18), "quitToolbox(appMgr)")
  85.                         else
  86.                           if the optionDown and (the keyCode = 118) then
  87.                             if paletteVisibleP then
  88.                               hidePalette(paletteMgr)
  89.                             end if
  90.                             forceBtnClick(interfaceMgr, "quit snd", "quit hilite", point(518, 18), "quitToolbox(appMgr)")
  91.                           else
  92.                             pass()
  93.                           end if
  94.                         end if
  95.                       end if
  96.                     end if
  97.                   end if
  98.                 end if
  99.               end if
  100.             end if
  101.           end if
  102.         end if
  103.       end if
  104.     end if
  105.   end if
  106. end
  107.